#define _CRT_SECURE_NO_WARNINGS 1

#include<iostream>

using namespace std;
#include"BSTree.h"
void TestBSTree()
{
	int a[] = { 8, 3, 1, 10, 6, 4, 7, 14, 13 };
	BSTree<int> t1;
	for (auto e : a)
	{
		t1.Insert(e);
	}

	//t1.InOrder(t1.GetRoot());
	//t1.InOrder();
	//cout << endl;
	//t1.Erase(4);
	//t1.InOrder();
	//cout << endl;
	//t1.Erase(14);
	//t1.InOrder();
	//cout << endl;
	//t1.Erase(3);
	//t1.InOrder();
	//cout << endl;
	//cout << endl;
	//t1.Erase(8);
	//t1.InOrder();

	//for (auto e : a)
	//{
	//	t1.Erase(e);
	//	t1.InOrder();
	//	cout << endl;
	//}
	t1.InOrder();
	cout << endl;
	t1.Erase(10);
	t1.Erase(14);
	t1.Erase(13);
	t1.Erase(8);
	t1.InOrder();
}

int main()
{
	TestBSTree();

	return 0;
}